import type { AppRouteModule } from '/@/router/types';
import { RoleEnum } from '/@/enums/roleEnum';

import { LAYOUT } from '/@/router/constant';
import { t } from '/@/hooks/web/useI18n';

const data: AppRouteModule = {
  path: '/data',
  name: 'data',
  component: LAYOUT,
  redirect: '/data/query',
  meta: {
    orderNo: 800,
    icon: 'ant-design:database-outlined',
    title: '数据管理',
    // hideChildrenInMenu: true,//WC
  },
  children: [
    {
      path: 'query',
      name: 'queryManagement',
      meta: {
        title: '数据查询',
        ignoreKeepAlive: true,
        roles: [RoleEnum.queryManagement]

      },
      component: () => import('/@/views/data/query/index.vue'),
    },
    {
      path: 'monitor',
      name: 'monitorManagement',
      meta: {
        title: '监控分析',
        ignoreKeepAlive: true,
        roles: [RoleEnum.monitorManagement]
      },
      component: () => import('/@/views/data/monitor/index.vue'),
    },
    {
      path: 'analyze-1',
      name: 'analyze-1-Management',
      meta: {
        title: '单通道分析',
        ignoreKeepAlive: true,
        hideMenu: true,
      },
      component: () => import('/@/views/data/monitor/analyze-1/index.vue'),
    },
    {
      path: 'analyze-2',
      name: 'analyze-2-Management',
      meta: {
        title: '多维对比分析',
        ignoreKeepAlive: true,
        hideMenu: true,
      },
      component: () => import('/@/views/data/monitor/analyze-2/index.vue'),
    },
    {
      path: 'analyze-tilt',
      name: 'analyze-tilt-Management',
      meta: {
        title: '倾斜分析',
        ignoreKeepAlive: true,
        hideMenu: true,
      },
      component: () => import('/@/views/data/monitor/analyze-3/index.vue'),
    },
    {
      path: 'analyze-gnss',
      name: 'analyze-gnss-Management',
      meta: {
        title: 'GNSS分析',
        ignoreKeepAlive: true,
        hideMenu: true,
      },
      component: () => import('/@/views/data/monitor/analyze-4/index.vue'),
    },
    {
      path: 'video',
      name: 'video-Management',
      meta: {
        title: '实时视频',
        ignoreKeepAlive: true,
        hideMenu: true,
      },
      component: () => import('/@/views/data/monitor/video/index.vue'),
    },
    {
      path: 'report',
      name: 'reportManagement',
      meta: {
        title: '数据报表',
        ignoreKeepAlive: true,
        roles: [RoleEnum.reportManagement]
      },
      component: () => import('/@/views/data/report/index.vue'),
    },
    {
      path: 'alarm',
      name: 'alarmManagement',
      meta: {
        title: '警告查看',
        // title: t('routes.demo.data.role'),
        ignoreKeepAlive: true,
        // hideMenu: true,//WC
        roles: [RoleEnum.alarmManagement]
      },
      component: () => import('/@/views/data/alarm/index.vue'),
    },

    // {
    //   path: 'log',
    //   name: 'logManagement',
    //   meta: {
    //     title: '日志查看',
    //     // title: t('routes.demo.data.log'),
    //     ignoreKeepAlive: true,
    //     // hideMenu: true,//WC
    //   },
    //   component: () => import('/@/views/data/log/index.vue'),
    // },

  ],
};

export default data;
